<table class="table table-hover">
	<thead>
		<tr>
			<th>
				<div class="btn-group">
					<button data-toggle="dropdown" class="btn btn-primary dropdown-toggle btn-sm" type="button">标题 <span class="caret"></span></button>
					<ul role="menu" class="dropdown-menu pull-right">
						<li><a href="javascript:sortChange('title')" ><i class="glyphicon glyphicon-arrow-down"></i> 顺序</a></li>
						<li><a href="javascript:sortChange('-title')" ><i class="glyphicon glyphicon-arrow-up"></i> 倒序</a></li>
					</ul>
				</div>
			</th>
			<th>
				<div class="btn-group">
					<button data-toggle="dropdown" class="btn btn-primary dropdown-toggle btn-sm" type="button">名称 <span class="caret"></span></button>
					<ul role="menu" class="dropdown-menu pull-right">
						<li><a href="javascript:sortChange('name')" ><i class="glyphicon glyphicon-arrow-down"></i> 顺序</a></li>
						<li><a href="javascript:sortChange('-name')" ><i class="glyphicon glyphicon-arrow-up"></i> 倒序</a></li>
					</ul>
				</div>
			</th>
			<th>
				<div class="btn-group">
					<button data-toggle="dropdown" class="btn btn-primary dropdown-toggle btn-sm" type="button">状态 <span class="caret"></span></button>
					<ul role="menu" class="dropdown-menu pull-right">
						<li><a href="javascript:sortChange('Status')" ><i class="glyphicon glyphicon-arrow-down"></i> 顺序</a></li>
						<li><a href="javascript:sortChange('-Status')" ><i class="glyphicon glyphicon-arrow-up"></i> 倒序</a></li>
					</ul>
				</div>
			</th>
			<th>操作</th>
		</tr>
	</thead>
	<tbody>
	{{range .griddate}}
		<tr {{if eq .Status 2}} class="success" {{end}}>
			<th>{{.Title}}</th>
			<th>{{.Name}}</th>
			<th>{{if eq .Status 2}} 启用
				{{else}} 禁用 {{end}}
			</th>
			<th>
				{{if .IsUse}}
					<a class="btn btn-sm btn-warning a_post" 
					href='{{urlfor "Admin.UserController.DelRoleUser" "userid" $.userinfo.Id "roleid" .Id}}' >移除</a>
				{{else}}
					<a href='{{urlfor "Admin.UserController.AddRoleUser" "userid" $.userinfo.Id "roleid" .Id}}' 
					class="btn btn-sm btn-primary a_post">添加</a>
				{{end}}
			</th>
		</tr>
	{{end}}
	</tbody>
</table>
<div class="row">
	<nav class="pull-right">
	{{if .paginator.HasPages}}
		<ul class="pagination pagination">
			{{if .paginator.HasPrev}}
			<li><a href="{{.paginator.PageLinkFirst}}">首页</a></li>
			<li><a href="{{.paginator.PageLinkPrev}}">&laquo;</a></li>
			{{else}}
			<li class="disabled"><a>首页</a></li>
			<li class="disabled"><a>&laquo;</a></li>
			{{end}}
			{{range $index, $page := .paginator.Pages}}
			<li{{if $.paginator.IsActive .}} class="active"{{end}}>
				<a href="{{$.paginator.PageLink $page}}">{{$page}}</a>
			</li>
			{{end}}
			{{if .paginator.HasNext}}
			<li><a href="{{.paginator.PageLinkNext}}">&raquo;</a></li>
			<li><a href="{{.paginator.PageLinkLast}}">末页</a></li>
			{{else}}
			<li class="disabled"><a>&raquo;</a></li>
			<li class="disabled"><a>末页</a></li>
			{{end}}
		</ul>
	{{end}}
	</nav>
</div>
